import request from '@/utils/request'
import downloadRequest from '@/utils/downloadRequest'

// 查询列表数据
export function load(data) {
  return request({
    url: '/user_organization/list_organization',
    method: 'post',
    data
  })
}

// 新增或修改
export function saveOrUpdate(data) {
  return request({
    url: '/user_organization/save_or_update',
    method: 'post',
    data
  })
}

// 查询部门下拉框
export function findUserOrganization(data) {
  return request({
    url: '/user_organization/find_organization',
    method: 'post',
    data
  })
}

// 导出excel
export function downExcel(data) {
  return downloadRequest({
    url: '/user_organization/export',
    method: 'post',
    responseType: 'blob',
    data
  })
}

// 删除组织
export function remove(data) {
  return request({
    url: '/user_organization/delete',
    method: 'post',
    data
  })
}
